home *** CD-ROM | disk | FTP | other *** search
- on swapCast spriteNumber, castMember
- set the castNum of sprite spriteNumber to member castMember
- set the visible of sprite spriteNumber to 1
- updateStage()
- end
-
- on setButtonChosen whichButton
- global TheirAnswer
- if TheirAnswer <> 0 then
- if TheirAnswer = whichButton then
- swapCast(whichButton + 15, "normal button")
- swapCast(30, "DoneNoSparkle")
- set TheirAnswer to 0
- end if
- else
- set TheirAnswer to whichButton
- repeat with buttonNum = 1 to 4
- if buttonNum = TheirAnswer then
- swapCast(buttonNum + 15, "yellow button")
- next repeat
- end if
- swapCast(buttonNum + 15, "normal button")
- end repeat
- swapCast(30, "DoneSparkle")
- updateStage()
- end if
- end
-
- on setButtonChosenFor2Choices whichButton
- global TheirAnswer1, TheirAnswer2, MultipleChoicesClicked
- if whichButton = TheirAnswer1 then
- swapCast(whichButton + 15, "normal button")
- swapCast(30, "DoneNoSparkle")
- set MultipleChoicesClicked to MultipleChoicesClicked - 1
- set TheirAnswer1 to 0
- exit
- end if
- if whichButton = TheirAnswer2 then
- swapCast(whichButton + 15, "normal button")
- swapCast(30, "DoneNoSparkle")
- set MultipleChoicesClicked to MultipleChoicesClicked - 1
- set TheirAnswer2 to 0
- exit
- end if
- if MultipleChoicesClicked = 2 then
- exit
- end if
- set MultipleChoicesClicked to MultipleChoicesClicked + 1
- case MultipleChoicesClicked of
- 1:
- set TheirAnswer1 to whichButton
- 2:
- if TheirAnswer2 = 0 then
- set TheirAnswer2 to whichButton
- else
- set TheirAnswer1 to whichButton
- end if
- end case
- swapCast(whichButton + 15, "yellow button")
- updateStage()
- if MultipleChoicesClicked = 2 then
- CreateTwoDigitAnswer(TheirAnswer1, TheirAnswer2)
- swapCast(30, "DoneSparkle")
- end if
- end
-
- on CreateTwoDigitAnswer TheirAnswer1, TheirAnswer2
- global TheirAnswer
- if TheirAnswer1 > TheirAnswer2 then
- set temp to TheirAnswer2
- set TheirAnswer2 to TheirAnswer1
- set TheirAnswer1 to temp
- end if
- set TheirAnswer to (10 * TheirAnswer1) + TheirAnswer2
- end
-
- on hCursor vTRUEorFALSE, vWhichCursor, vFirstSprite, vLastSprite
- set lStrCursorMask to vWhichCursor && "mask"
- set gCursor to [the number of member vWhichCursor, the number of member lStrCursorMask]
- if vTRUEorFALSE = 1 then
- if vFirstSprite = vLastSprite then
- set the cursor of sprite vFirstSprite to gCursor
- else
- repeat with n = vFirstSprite to vLastSprite
- set the cursor of sprite n to gCursor
- end repeat
- end if
- else
- if vFirstSprite = vLastSprite then
- set the cursor of sprite vFirstSprite to 0
- else
- repeat with n = vFirstSprite to vLastSprite
- set the cursor of sprite n to 0
- end repeat
- end if
- end if
- end
-
- on hCheckStatus
- set lStrStatus to the name of member the castNum of sprite 30
- if lStrStatus = "RarrowOnly" then
- return 1
- else
- return 0
- end if
- end
-